public class State {

	public int numberOfTransmittedChannels;
	public int numberOfInterferences;

	public State() {
		numberOfTransmittedChannels = 0;
		numberOfInterferences = 0;
	}
	
	public State(State s) {
		this.numberOfTransmittedChannels = s.numberOfTransmittedChannels;
		this.numberOfInterferences = s.numberOfInterferences;
	}

	public void increaseTransmittedChannels() {
		numberOfTransmittedChannels++;
	}

	public void decreaseTransmittedChannels() {
		numberOfTransmittedChannels--;
	}
	
	public void increaseInterferences() {
		numberOfInterferences++;
	}
	
	public void resetInterferences() {
		numberOfInterferences = 0;
	}

	public String toString() {
		return "Number of Transmitted Channels: " + numberOfTransmittedChannels + ", Number of Interferences: " + numberOfInterferences;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + numberOfInterferences;
		result = prime * result + numberOfTransmittedChannels;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		State other = (State) obj;
		if (numberOfInterferences != other.numberOfInterferences)
			return false;
		if (numberOfTransmittedChannels != other.numberOfTransmittedChannels)
			return false;
		return true;
	}
		
}
